Method and apparatus for coding unit partitioning

ABSTRACT

A method for coding unit partitioning in a video encoder is provided that includes performing intra-prediction on each permitted coding unit (CU) in a CU hierarchy of a largest coding unit (LCU) to determine an intra-prediction coding cost for each permitted CU, storing the intra-prediction coding cost for each intra-predicted CU in memory, and performing inter-prediction, prediction mode selection, and CU partition selection on each permitted CU in the CU hierarchy to determine a CU partitioning for encoding the LCU, wherein the stored intra-prediction coding costs for the CUs are used.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/559,788, filed Sep. 4, 2019, which is a continuation of U.S. patentapplication Ser. No. 13/548,085, filed Jul. 12, 2012, now U.S. Pat. No.10,440,373, which claims benefit of U.S. Provisional Patent ApplicationSer. No. 61/506,838, filed Jul. 12, 2011, all of which are incorporatedherein by reference in their entirety. This application is related toco-pending U.S. patent application Ser. No. 13/548,100, filed Jul. 12,2012.

BACKGROUND OF THE INVENTION Field of the Invention

Embodiments of the present invention generally relate to coding unitpartitioning in video coding.

Description of the Related Art

Video compression, i.e., video coding, is an essential enabler fordigital video products as it enables the storage and transmission ofdigital video. In general, video compression techniques applyprediction, transformation, quantization, and entropy coding tosequential blocks of pixels in a video sequence to compress, i.e.,encode, the video sequence. Video decompression techniques generallyperform the inverse of these operations in reverse order to decompress,i.e., decode, a compressed video sequence.

The Joint Collaborative Team on Video Coding (JCT-VC) of ITU-T WP3/16and ISO/IEC JTC 1/SC 29/WG 11 is currently developing thenext-generation video coding standard referred to as High EfficiencyVideo Coding (HEVC). HEVC is expected to provide around 50% improvementin coding efficiency over the current standard, H.264/AVC, as well aslarger resolutions and higher frame rates. To address theserequirements, HEVC utilizes larger block sizes than the current videocoding standard, H.264/AVC. More specifically, in HEVC, a largest codingunit (LCU) is the base unit used for block-based coding. An LCU plays asimilar role in coding as the 16×16 macroblock of H.264/AVC, but it maybe larger, e.g., 32×32, 64×64, etc.

In HEVC, a picture is divided into non-overlapping LCUs. As used herein,the term “picture” may refer to a frame or a field of a frame. A frameis a complete image captured during a known time interval. To maximizecoding efficiency, an LCU may be partitioned into coding units (CU) ofdifferent sizes using recursive quadtree partitioning. The quadtree issplit according to various criteria until a leaf is reached, which isreferred to as a coding unit (CU). The maximum hierarchical depth of thequadtree is determined by the size of the smallest CU (SCU) permitted. ACU is the root node of two trees, a prediction tree and a transformtree. A CU may be inter-predicted or intra-predicted.

A prediction tree specifies the position and size of prediction units(PU) for a coding unit. A prediction unit may not be larger than acoding unit and other size restrictions depend upon whether a CU isinter-predicted or intra-predicted. A transform tree specifies theposition and size of transform units (TU) for a coding unit. A transformunit may not be larger than a coding unit and the size of a transformunit may be, for example, 4×4, 8×8, 16×16, 32×32, 4×16, 16×4, 8×32, and32×8. The quadtree partitioning of an LCU into CUs and the sizes of thetransforms units and prediction units for a CU are determined by a videoencoder during prediction based on minimization of rate/distortioncosts. The LCU size, the SCU size, and the partitioning signaled in thesequence parameter set (SPS) of an encoded bit stream.

SUMMARY

Embodiments of the present invention relate to methods, apparatus, andcomputer readable media for coding unit partitioning. In one aspect, amethod for coding unit partitioning in a video encoder is provided thatincludes performing intra-prediction on each permitted coding unit (CU)in a CU hierarchy of a largest coding unit (LCU) to determine anintra-prediction coding cost for each permitted CU, storing theintra-prediction coding cost for each intra-predicted CU in memory, andperforming inter-prediction, prediction mode selection, and CU partitionselection on each permitted CU in the CU hierarchy to determine a CUpartitioning for encoding the LCU, wherein the stored intra-predictioncoding costs for the CUs are used.

In one aspect, a digital system configured to encode a video stream isprovided that includes a memory, means for performing intra-predictionon each permitted coding unit (CU) in a CU hierarchy of a largest codingunit (LCU) to determine an intra-prediction coding cost for eachpermitted CU, means for storing the intra-prediction coding cost foreach intra-predicted CU in the memory, and means for performinginter-prediction, prediction mode selection, and CU partition selectionon each permitted CU in the CU hierarchy to determine a CU partitioningfor encoding the LCU, wherein the stored intra-prediction coding costsfor the CUs are used.

In one aspect, a computer readable medium is provided that storessoftware instructions that when executed in a digital system cause thedigital system to perform a method for coding unit partitioning as partof encoding a video stream. The method includes performingintra-prediction on each permitted coding unit (CU) in a CU hierarchy ofa largest coding unit (LCU) to determine an intra-prediction coding costfor each permitted CU, storing the intra-prediction coding cost for eachintra-predicted CU in memory, and performing inter-prediction,prediction mode selection, and CU partition selection on each permittedCU in the CU hierarchy to determine a CU partitioning for encoding theLCU, wherein the stored intra-prediction coding costs for the CUs areused.

BRIEF DESCRIPTION OF THE DRAWINGS

Particular embodiments will now be described, by way of example only,and with reference to the accompanying drawings:

FIG. 1 illustrates quadtree partitioning of a largest coding unit;

FIG. 2 shows examples of coding unit (CU) size combinations for severalvideo resolutions;

FIG. 3 is a block diagram illustrating CU partitioning in which motionestimation and intra-prediction communicate at the CU level;

FIGS. 4A-4C and 5 are examples;

FIG. 5 illustrates a method for context selection;

FIG. 6 is a block diagram of a digital system;

FIG. 7 is a block diagram of a video encoder;

FIG. 8 is a block diagram of the mode selection component of the videoencoder of FIG. 7 ;

FIG. 9 is an example illustrating fast motion search for CUpartitioning;

FIG. 10 shows the PU partition types for various CU sizes;

FIG. 11 is a flow diagram of a method for CU partitioning;

FIG. 12 is a flow diagram of a method for fast motion search; and

FIG. 13 is a block diagram of an illustrative digital system.

DETAILED DESCRIPTION OF EMBODIMENTS OF THE INVENTION

Specific embodiments of the invention will now be described in detailwith reference to the accompanying figures. Like elements in the variousfigures are denoted by like reference numerals for consistency.

For convenience of description, one or more embodiments are describedherein in reference to HEVC and use terminology from HEVC. One ofordinary skill in the art will understand that embodiments are notlimited to HEVC. Further, as is well known, a block of video data mayinclude both luma data and chroma data, which may be encoded separately.While embodiments are described herein without distinguishing betweenluma and chroma, one of ordinary skill in the art will understand thatthe embodiments apply to both luma and chroma data encoding.

Various versions of HEVC are described in the following documents, whichare incorporated by reference herein: T. Wiegand, et al., “WD3: WorkingDraft 3 of High-Efficiency Video Coding,” JCTVC-E603, JointCollaborative Team on Video Coding (JCT-VC) of ITU-T SG16 WP3 andISO/IEC JTC1/SC29/WG11, Geneva, CH, Mar. 16-23, 2011 (“WD3”), B. Bross,et al., “WD4: Working Draft 4 of High-Efficiency Video Coding,”JCTVC-F803_d6, Joint Collaborative Team on Video Coding (JCT-VC) ofITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Torino, IT, Jul. 14-22, 2011(“WD4”), B. Bross. et al., “WD5: Working Draft 5 of High-EfficiencyVideo Coding,” JCTVC-G1103_d9, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11, Geneva, CH, Nov.21-30, 2011 (“WD5”), B. Bross, et al., “High Efficiency Video Coding(HEVC) Text Specification Draft 6,” JCTVC-H1003, Joint CollaborativeTeam on Video Coding (JCT-VC) of ITU-T SG16 WP3 and ISO/IECJTC1/SC29/WG1, Geneva, CH, Nov. 21-30, 2011 (“HEVC Draft 6”), and B.Bross, et al., “High Efficiency Video Coding (HEVC) Text SpecificationDraft 7,” JCTVC-I1003_d0, Joint Collaborative Team on Video Coding(JCT-VC) of ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG1, Geneva, CH, Apr.17-May 7, 2012 (“HEVC Draft 7”).

As was previously described, in HEVC, a picture is divided into largestcoding units (LCUs) and each LCU may be further divided into a hierarchyof coding units (CUs). The coding unit partitioning is based on aquadtree. FIG. 1 shows an example of CU partitioning in which the LCUsize is 64×64 and maximum hierarchical depth is 4. The recursivestructure, i.e., the partitioning, is represented by a series of splitflags. For CU_(d), which has depth d and size 2N×2N, the coding of theCU is performed in the current depth when split flag is set to zero.When the split flag is set to 1, CU_(d) is split into 4 independentCU_(d+1) which have depth (d+1) and size N×N. In this case, CU_(d+1) iscalled a sub-CU of CU_(d) similar to a sub-macroblock in H.264/AVC.Unless the depth of sub-CU (d+1) is equal to the maximum allowed depth,each CU_(d−1) is processed in a recursive manner. If the depth of sub-CU(d+1) is equal to the maximum allowed depth, further splitting is notallowed. For coding, a CU can be further split into PUs and TUs.

The sizes of LCU and SCU are specified in the Sequence Parameter Set(SPS). The embedded information in the SPS is LCU size (s) and themaximum hierarchical depth (h) in a LCU. For example, if s=64 and h=4,then 4 kinds of CU sizes are possible: 64×64 (LCU), 32×32, 16×16 and 8×8(SCU). If s=16 and h=2, then 16×16 (LCU) and 8×8 (SCU) are possible;this is a similar block structure to H.264/AVC.

This hierarchical coding unit representation provides several majorbenefits. When the region of interest in a picture is homogeneous, alarge CU can represent the region in a smaller number of symbols thanwould be possible if several small blocks are used. In addition,supporting configurable LCU sizes enables a codec to be readilyoptimized for various content, applications and devices. For example,choosing an appropriate LCU size and maximum hierarchical depth allowsthe hierarchical block structure to be optimized for a targetedapplication. FIG. 2 shows examples of CU size combinations for severalresolutions.

In some codecs, the partitioning of LCUs into CUs is decided based oncoding costs determined by intra-prediction and intra-prediction inwhich information is shared between inter-prediction andintra-prediction at the CU level. FIG. 3 shows a block diagramillustrating CU partitioning and mode selection in such a codec. Thisexample assumes that the partitioning process is performed bottom up,i.e., starting with the smallest possible CU partitioning and working upthe hierarchy levels. For simplicity of explanation, a 64×64 LCU and ahierarchy depth of 4 is assumed. Thus, the smallest CU size is 8×8.FIGS. 4A-4C illustrate, respectively, the partitioning of a 64×64 LCUinto 32×32 CUs, the 32×32 CUs into 16×16 CUs, and the 16×16 CUs into 8×8CUs.

In general, the inter-prediction component 300 determines aninter-prediction coding cost for a CU, a best PU partition type for theCU, and an inter-prediction mode for each PU of the best PU partitiontype. To determine the best PU partition type and the inter-predictionmodes for the PUs of the best PU partition type, the inter-predictioncomponent 300 partitions the CU into PUs according to HEVC-specified PUpartition types and performs tests each PU of a PU partition typeaccording to a skip mode, a merge mode, and a normal inter-predictionmode to choose the best inter-prediction mode for each PU based oncoding costs of these modes. Skip mode is a special case of merge modein which the residual is not coded and will not be further describedherein. FIG. 10 shows the different PU partition types specified inHEVC, e.g., HEVC Draft 7. Note that all PU partition types may not beused for all CU sizes. For example, the N×N PU partition type may onlybe used for the smallest CU size, i.e., 8×8.

After the best inter-prediction mode for each PU in a PU partition typeis determined, the inter-prediction component 300 computes the codingcost for the PU partition type as the sum of the coding costs of thebest inter-prediction modes of the PUs. After each specified PUpartition type has been processed to determine the best inter-predictionmodes of the PUs and the coding cost of the PU partition type, theinter-prediction component 300 selects the PU partition type with thesmallest coding cost as the best PU partition type for the CU. Thecoding cost of the selected PU partition type is the inter-predictioncoding cost for the CU.

More specifically, the inter-prediction component 300 processes a CU foreach of the PU partition types specified for the particular CU size todetermine the best PU partition type and the inter-prediction codingcost for the CU. As shown in FIG. 10 , the PU partition types forinter-prediction of the smallest CU are 2N×2N, 2N×N, N×2N, and N×N andthe PU partition types for inter-prediction of the larger CUs are 2N×2N,2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N. For the 2N×2N PU partitiontype, there is a single PU. To determine the best inter-prediction modefor the PU, the inter-prediction component 300 determines a coding costof the PU for normal inter-prediction mode and a coding cost of the PUfor merge mode. To determine the coding cost for normal inter-predictionmode, the inter-prediction component 300 performs a forward motionsearch and a backward motion search to determine the best forward motionvector and backward motion vector for the PU, i.e., to find a bestmatching block of the same size and shape as the PU in a forwardreference picture and in a backward reference picture. A motion vectorpredictor (MVP) is also selected for the best forward motion vector andthe best backward motion vector. Selection of an MVP for a motion vectoris described in HEVC, e.g., HEVC Draft 7. The prediction direction,forward, backward, or bi-prediction, is selected based on the bestforward motion vector and the best backward motion vector. Theinter-prediction component 300 then computes a normal inter-predictionmode coding cost for the PU based on the motion vector(s) of theselected prediction direction.

The coding cost of a PU for normal inter-prediction mode may be computedas. SAD (or SATD)+λ*MVbits, where λ, is the Lagrangian multiplier, andMVbits is the number of bits for encoding the motion vector(s). SAD isthe sum of absolute differences between the PU and the predicted PU,i.e., the best matching block in the reference picture. SATD is the sumof the absolute transform differences between the PU and the predictedPU. To compute SATD, first the residual block, i.e., the current PUminus the predicted PU, is created. Then, a Hadamard transform isapplied to the residual block and the Hadamard transform coefficientsare summed. The number of bits for motion vectors, MVbits, may beestimated as the difference between the PU motion vector(s) and themotion vector predictor(s).

In general, merge mode allows an inter-predicted PU to inherit a motionvector, prediction direction, and reference picture index from aninter-predicted PU which contains a motion data position selected fromspecified spatially neighboring motion data positions and temporallyco-located motion data positions. To determine the coding cost of the PUfor merge mode, the inter-prediction component 300 generates a mergingcandidate list from the spatially neighboring motion data positions andthe temporally co-located motion data positions, and selects the bestcandidate from the list for merge mode. Construction of a mergingcandidate list for a PU is described in HEVC, e.g., HEVC Draft 7. Theinter-prediction component 300 then computes a merge mode coding costfor the PU based on the selected merging candidate.

The coding cost of a PU for merge mode may be computed as SAD (orSATD)+λ*BitsForMergeCandidateIndex, where BitsForMergeCandidateIndex isthe estimated number of bits needed to code the index of the selectedmerging candidate in the merging candidate list.

The inter-prediction component 300 then compares the merge mode codingcost for the PU and the normal inter-prediction coding cost for the PUand selects the mode with the lowest cost as the inter-prediction modefor the PU. The coding cost of the selected mode is the coding cost forthe 2N×2N PU partition type.

For the 2N×2N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N PU partitiontypes, there are two PUs, PU0 and PU1 (see FIG. 10 ). Theinter-prediction component 300 determines a coding cost for each ofthese PU partition types as follows. To determine the bestinter-prediction mode for PU0, the inter-prediction component 300determines a coding cost of PU0 for normal inter-prediction mode and acoding cost of PU0 for merge mode in the same way as described above forthe PU of the 2N×2N PU partition type. The inter-prediction component300 then compares the merge mode coding cost for PU0 and the normalinter-prediction coding cost for PU0 and selects the mode with thelowest cost as the inter-prediction mode for PU0.

To determine the best inter-prediction mode for PU1, theinter-prediction component 300 determines a coding cost of PU1 fornormal inter-prediction mode and a coding cost of PU1 for merge mode inthe same way as described above for the PU of the 2N×2N PU partitiontype. The inter-prediction component 300 then compares the merge modecoding cost for PU1 and the normal inter-prediction coding cost for PU1and selects the mode with the lowest cost as the inter-prediction modefor PU 1.

Once the best inter-prediction mode is selected for PU0 and PU1, theinter-prediction component 300 sums the coding cost of theintra-prediction mode selected for PU0 and the coding cost of theinter-prediction mode selected for PU1 to determine the coding cost forthe PU partition type.

For the N×N PU partition type, there are four PUs, PU0, PU1, PU2, andPU3 (see FIG. 10 ). To determine the best inter-prediction mode for eachof these PUs, the inter-prediction component 300 determines a codingcost of the PU for normal inter-prediction mode and a coding cost of thePU for merge mode in the same way as described above for the PU of the2N×2N PU partition type. The inter-prediction component 300 thencompares the merge mode coding cost for the PU and the normalinter-prediction coding cost for the PU and selects the mode with thelowest cost as the inter-prediction mode for the PU.

Once the best inter-prediction mode is selected for each of PU0, PU1,PU2, and PU3, the inter-prediction component 300 sums the coding cost ofthe inter-prediction mode selected for PU0, the coding cost of theinter-prediction mode selected for PU1, the coding cost of theinter-prediction mode selected for PU2, and the coding cost of theinter-prediction mode selected for PU3 to determine the coding cost forthe N×N partition type.

After coding costs are determined for the particular PU partition typesto be considered for a CU, i.e., 2N×2N, 2N×N, N×2N, and N×N if the CU isthe smallest CU size, 2N×2N, 2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2Nif the CU is not the smallest CU size, the inter-prediction component300 selects the PU partition type with the smallest coding cost as thePU partition type for the CU. The coding cost of the selected PUpartition type is the inter-prediction coding cost for the CU. Thisinter-prediction coding cost, the selected PU partition type, and theinter-prediction modes selected for the PUs in the selected PU partitiontype are provided to the mode decision component 304.

In general, the intra-prediction component 302 performs tests on thesame CU processed by the inter-prediction component 300 (either seriallyor in parallel) to determine an intra-prediction coding cost for the CU,a best PU partition type for the CU, and an intra-prediction mode foreach PU of the best partition type. The particular intra-predictionmodes to be considered are defined by HEVC. To determine the best PUpartition type and the intra-prediction modes for the PUs of the best PUpartition type, the intra-prediction component 302 partitions the CUinto PUs according to HEVC-specified PU partition types forintra-prediction of a CU of the CU size. The intra-prediction component302 performs tests on each PU of a PU partition type according tointra-prediction modes specified for the PU size and using data frompreviously encoded neighboring CUs to choose the best intra-predictionmode for each PU based on coding costs of these modes. In HEVC, e.g.,HEVC Draft 7, there are thirty-five intra-prediction modes for each PUsize. FIG. 10 shows the different PU partition types specified in HEVC,e.g., HEVC Draft 7. Note that for intra-prediction of a CU of thesmallest size, only the 2N×2N and N×N partition types are used, and forthe larger CU sizes, only the 2N×2N partition type is used.

After the best intra-prediction mode for each PU in a PU partition typeis determined, the intra-prediction component 302 computes the codingcost for the PU partition type as the sum of the coding costs of thebest intra-prediction modes of the PUs. After each specified PUpartition type has been processed to determine the best intra-predictionmodes of the PUs and the coding cost of the PU partition type, theintra-prediction component 302 selects the PU partition type with thesmallest coding cost as the best PU partition type for the CU. Thecoding cost of the selected PU partition type is the intra-predictioncoding cost for the CU.

More specifically, the intra-prediction component 302 processes the CUfor each of the PU partition types specified for the particular CU sizeto determine the best PU partition type and the inter-prediction codingcost for the CU. As shown in FIG. 10 , the PU partition types forinter-prediction of the smallest CU are 2N×2N and N×N and the sole PUpartition type for intra-prediction of the larger CUs is 2N×2N. For the2N×2N PU partition type, there is a single PU. To determine the bestintra-prediction mode for the PU, the intra-prediction component 302performs intra-prediction according to each intra-prediction modespecified for the PU size and determines a coding cost of the PU for theintra-prediction mode.

The intra-prediction component 302 then compares the coding costs ofeach intra-prediction mode and selects the intra-prediction mode withthe lowest cost as the intra-prediction mode for the PU. The coding costof the selected mode is the coding cost for the 2N×2N PU partition type.The coding cost of a PU for an intra-prediction mode may be computed asSAD (or SATD)+λ*PredModeBits, where PredModeBits is the estimated numberof bits to code the prediction directions.

For the N×N PU partition type, there are four PUs, PU0, PU1, PU2, andPU3 (see FIG. 10 ). To determine the best intra-prediction mode for PU0,the intra-prediction component 302 performs intra-prediction accordingto each intra-prediction mode specified for the PU size and determines acoding cost of PU0 for the intra-prediction mode. The intra-predictioncomponent 302 then compares the coding costs of each intra-predictionmode and selects the intra-prediction mode with the lowest cost as theintra-prediction mode for PU0. The intra-prediction component 302determines intra-prediction modes for PU1, PU2, and PU3 in the same wayas for PU0.

Once the best intra-prediction mode is selected for each of PU0, PU1,PU2, and PU3, the intra-prediction component 302 sums the coding cost ofthe intra-prediction mode selected for PU0, the coding cost of theintra-prediction mode selected for PU1, the coding cost of theintra-prediction mode selected for PU2, and the coding cost of theintra-prediction mode selected for PU3 to determine the coding cost forthe N×N partition type.

After coding costs are determined for the particular PU partition typesto be considered for the CU, i.e., 2N×2N and N×N if the CU is thesmallest CU size and 2N×2N if the CU is not the smallest CU size, theintra-prediction component 302 selects the PU partition type with thesmallest coding cost as the PU partition type for the CU. The codingcost of the selected PU partition type is the intra-prediction codingcost for the CU. This intra-prediction coding cost, the selected PUpartition type, and the intra-prediction modes selected for the PUs inthe selected PU partition type are provided to the mode decisioncomponent 304.

The mode decision 304 compares the intra-prediction coding cost and theinter-prediction coding cost for a CU and chooses the lowest costprediction mode as the best prediction mode for the CU. Informationregarding the best prediction mode is then provided to theinter-prediction component 300 and the intra-prediction component 302for use in processing of subsequent CUs. The best mode informationincludes an indication of whether the CU is inter or intra-predicted. Ifthe CU is intra-predicted, the best mode information may also includethe intra-prediction modes for the PUs, the PU partitioning, and the CUintra-prediction coding cost. If the CU is inter-predicted, the bestmode information may also include the inter-prediction modes of the PUs,the PU partitioning, the CU inter-prediction coding cost, and the motionvectors and reference indices for the PUs.

The best mode information is also provided to the CU selection component306. For each four child CUs and the parent CU, the CU selectioncomponent 306 selects the best CU partition based on the summed codingcosts of the four child CUs and the coding cost of the parent CU, i.e.,the CU partition with the smallest coding cost is selected. The bestmode information for the selected CU partition is provided to theinter-prediction component 300 and the intra-prediction component 302for use in processing of subsequent CUs.

The operation of the system of FIG. 3 is now explained in more detail inreference to the example of FIGS. 4A-4C. Beginning with the smallest CUsize, i.e., 8×8, inter-prediction coding costs and intra-predictioncoding costs are determined for CUs A11, A12, A13, and A14. That is, CUA11 is processed by the inter-prediction component 300 to determine aninter-prediction cost and by the intra-prediction component 302 todetermine an inter-prediction cost. The mode decision component 304 thenselects the lowest cost prediction mode as the best prediction mode forCU A11. The best mode information is provided to the inter-predictioncomponent 300 and the intra-prediction component 302 for use inprocessing of subsequent CUs. The best mode information is also providedto the CU selection component 306.

CUs A12, A13, and A14 are similarly processed to select the bestprediction mode for each CU. The parent CU A1 is then processed in asimilar fashion to select the best prediction mode. The CU selectioncomponent 306 then selects the CU partition by comparing the sum of thecoding costs of the child CUs, A11, A12, A13, and A14, to the codingcost of the parent CU, A1, and choosing the partition with the leastcost. The best mode information of the selected CU partition is providedto inter-prediction component 300 and the intra-prediction component 302for use in processing subsequent CUs.

The parent CUs A2, A3, and A4 and their respective child CUs aresimilarly processed to select the best CU partitions and predictionmode(s) for the respective regions of the LCU. The parent of CUs A1, A2,A3, and A4, CU A, is then processed in a similar fashion to select thebest prediction mode for that CU. The CU selection component 306 thenselects the CU partition by comparing the sum of coding costs of thechild CUs, A1, A2, A3, and A4, to the coding cost of the parent CU, CUA, and choosing the partition with the least cost.

Note that at this point, the CU hierarchy for CU A may be the entire CU,the four 16×16 CUs, A1, A2, A3, and A4, the 16 8×8 CUs, A11-A44, or acombination of 16×16 and 8×8 CUs. For example, as shown in FIG. 5 , theCU hierarchy for CU A may be as shown when the coding costs of CUs A1,A3, and A4 are better than the summed costs of their child CUs and thesummed costs of the child CUs of CU A2 are better than the cost of theirparent CU.

Referring again to FIGS. 4A-4C, CUs B, C, and D are processed in turn asdescribed above to choose the best prediction modes and partitionsbeginning with the smallest CU size. As with CU A, the CU hierarchy foreach of CUs B, C, and D may be the entire CU, the four 16×16 CUs, the 168×8 CUs, or a combination of 16×16 and 8×8 CUs. For example, as shown inFIG. 5 , the CU hierarchy for CU B may be as shown when the coding costof CU B is better than the summed coding cost of CUs B1, B2, B3, and B4.Further, the CU hierarchy for CU C may be as shown when the coding costof each of the CUs C1, C2, C3, and C4 is better than the summed codingcosts of their respective child CUs and the summed coding costs of thesefour CUs are better than the coding cost of CU B. In addition, the CUhierarchy for CU D may be as shown when the coding costs of CUs D2, D3,and D4 are better than the summed costs of their child CUs and thesummed costs of the child CUs of CU D1 are better than the cost of theirparent CU.

As a final step, the best prediction mode of the LCU is determined andthe coding cost of this prediction mode is compared to the summed codingcosts of CUs A, B, C, and D. If the coding cost of the LCU is better,then the LCU is coded according the best mode; otherwise, the LCU iscoded according to the best modes/CU structures of CUs A, B, C, and D.Note that in determining the summed coding costs of CUs A, B, C, and D,the coding costs of the CUs in the hierarchy of each of these CUs isused. For example, in the example of FIG. 5 , the coding cost of CU A isthe summed coding costs of CUs A1, A21, A22, A23, A24, A3, and A4 andthe coding cost of CU C is the summed coding costs of CUs C1, C2, C3,and C4.

Referring again to FIG. 3 , this bottom-up CU selection process assumesthat the inter-prediction component 300 and the intra-predictioncomponent 302 modules are able to communicate at the CU level. Thus, theselected best mode/CU partition information for a given CU isimmediately available to both modules for use in the next CU coding costcalculation. This CU level communication between motion estimation andintra-prediction enables upper-bound encoding performance through theuse of accurate neighboring information at each level. However, thisbottom-up approach with communication between motion estimation andintra-prediction at the CU level is complex and requires significantbandwidth to meet coded throughput requirements. Further, this approachmay not be suitable for pipelined architectures that process many LCUsin parallel.

For example, in many embedded systems supporting video processing, theremay be one master processor and one or more slave processing modules,e.g., hardware accelerators. The master processor operates as the codingcontrol component and runs the main control loop for video encoding, andthe slave processing modules are employed to off load certaincompute-intensive tasks of video encoding such as motion estimation,motion compensation, intra prediction mode estimation, transformationand quantization, entropy coding, and loop filtering. The slaveprocessing modules are controlled in a pipeline fashion by the masterprocessor such that the slave processing modules operate on differentLCUs of a picture at any given time. That is, the slave processingmodules are executed in parallel, each processing its respective LCUwhile data movement from one processor to another is serial. Ifinter-prediction and intra-prediction are performed by different slaveprocessing modules at the LCU level, the CU level communication of theabove described bottom up approach may not be feasible.

Further, motion estimation is one of the most time consuming parts ofthe CU partitioning process. As can be seen from the above descriptionof bottom up CU partitioning, motion estimation is performed for each CUat each level in the CU hierarchy. That is, motion estimation isperformed for each of the PUs of each specified PU partitioning of a CU.

Some embodiments of the invention provide for CU partitioning in whichmotion estimation and intra-prediction communicate at the LCU levelinstead of the CU level. More specifically, intra-prediction isperformed for all CUs at all hierarchy levels in an LCU. Theintra-prediction is performed bottom up with the assumption that all ofthe CUs are intra-predicted. The best intra-prediction mode and codingcost for each CU at each hierarchy level are stored for use ininter-prediction, mode selection, and CU partition selection.Inter-prediction, mode selection, and CU partition selection are thenperformed bottom up on the LCU using the stored intra-predictioninformation to determine the CU partitioning for encoding. While theprediction accuracy may be somewhat degraded due to the lack of accurateCU level neighboring information during intra-prediction, the minimalloss in accuracy may be acceptable given the increase in throughput andthe ability to implement on LCU-based pipeline architectures.

Some embodiments of the invention provide simplified, faster motionestimation during CU partitioning. In general, the faster motionestimation may use a more complex motion search technique for thesmallest CUs at the lowest hierarchy level, and a simpler motion searchtechnique based on motion vectors of children CUs for CUs at higherlevels, i.e., parent CUs, in the hierarchy. For a (forward or backward)motion search for a PU in a parent CU, a (forward or backward) predictoris selected from the best (forward or backward) motion vectors from thechild CUs. These (forward or backward) motion vectors are the best(forward or backward) motion vectors generated for normalinter-prediction mode of each child CU. The (forward or backward)predictor is then refined using a simple search technique, e.g., a onestep search in which eight neighboring positions around the (forward orbackward) predictor are evaluated, to determine the (forward orbackward) motion vector for the PU.

FIG. 6 shows a block diagram of a digital system that includes a sourcedigital system 600 that transmits encoded video sequences to adestination digital system 602 via a communication channel 616. Thesource digital system 600 includes a video capture component 604, avideo encoder component 606, and a transmitter component 608. The videocapture component 604 is configured to provide a video sequence to beencoded by the video encoder component 606. The video capture component604 may be, for example, a video camera, a video archive, or a videofeed from a video content provider. In some embodiments, the videocapture component 604 may generate computer graphics as the videosequence, or a combination of live video, archived video, and/orcomputer-generated video.

The video encoder component 606 receives a video sequence from the videocapture component 604 and encodes it for transmission by the transmittercomponent 608. The video encoder component 606 receives the videosequence from the video capture component 604 as a sequence of pictures,divides the pictures into largest coding units (LCUs), and encodes thevideo data in the LCUs. The video encoder component 606 may beconfigured to perform coding unit partitioning as described hereinduring the encoding process. In some embodiments, a fast motionestimation technique as described herein may be used in the coding unitpartitioning. An embodiment of the video encoder component 606 isdescribed in more detail herein in reference to FIG. 7 .

The transmitter component 608 transmits the encoded video data to thedestination digital system 602 via the communication channel 616. Thecommunication channel 616 may be any communication medium, orcombination of communication media suitable for transmission of theencoded video sequence, such as, for example, wired or wirelesscommunication media, a local area network, or a wide area network.

The destination digital system 602 includes a receiver component 610, avideo decoder component 612 and a display component 614. The receivercomponent 610 receives the encoded video data from the source digitalsystem 600 via the communication channel 616 and provides the encodedvideo data to the video decoder component 612 for decoding. The videodecoder component 612 reverses the encoding process performed by thevideo encoder component 606 to reconstruct the LCUs of the videosequence.

The reconstructed video sequence is displayed on the display component614. The display component 614 may be any suitable display device suchas, for example, a plasma display, a liquid crystal display (LCD), alight emitting diode (LED) display, etc.

In some embodiments, the source digital system 600 may also include areceiver component and a video decoder component and/or the destinationdigital system 602 may include a transmitter component and a videoencoder component for transmission of video sequences both directionsfor video steaming, video broadcasting, and video telephony. Further,the video encoder component 606 and the video decoder component 612 mayperform encoding and decoding in accordance with one or more videocompression standards. The video encoder component 606 and the videodecoder component 612 may be implemented in any suitable combination ofsoftware, firmware, and hardware, such as, for example, one or moredigital signal processors (DSPs), microprocessors, discrete logic,application specific integrated circuits (ASICs), field-programmablegate arrays (FPGAs), etc.

FIG. 7 shows a block diagram of the LCU processing portion of an examplevideo encoder. A coding control component (not shown) sequences thevarious operations of the LCU processing, i.e., the coding controlcomponent runs the main control loop for video encoding. The codingcontrol component receives a digital video sequence and performs anyprocessing on the input video sequence that is to be done at the picturelevel, such as determining the coding type (I, P, or B) of a picturebased on the high level coding structure, e.g., IPPP, IBBP,hierarchical-B, and dividing a picture into LCUs for further processing.

In addition, for pipelined architectures in which LCUs are processedconcurrently in different components of the LCU processing, the codingcontrol component controls the processing of LCUs by various componentsof the LCU processing in a pipeline fashion. For example, in manyembedded systems supporting video processing, there may be one masterprocessor and one or more slave processing modules, e.g., hardwareaccelerators. The master processor operates as the coding controlcomponent and runs the main control loop for video encoding, and theslave processing modules are employed to off load certaincompute-intensive tasks of video encoding such as motion estimation,motion compensation, intra prediction mode estimation, transformationand quantization, entropy coding, and loop filtering. The slaveprocessing modules are controlled in a pipeline fashion by the masterprocessor such that the slave processing modules operate on differentblocks of a picture at any given time. That is, the slave processingmodules are executed in parallel, each processing its respective blockwhile data movement from one processor to another is serial.

The LCU processing receives LCUs of the input video sequence from thecoding control component and encodes the LCUs under the control of thecoding control component to generate the compressed video stream. TheLCUs from the coding control unit are provided as one input of a modeselection component 700 and to a positive input of a combiner 702 (e.g.,adder or subtractor or the like). Further, although not specificallyshown, the prediction mode of each picture as selected by the codingcontrol component is provided to the mode selection component 700 andthe entropy encoder 708.

The reference storage component 716 provides reference data to the modeselection component 700. The reference data may include one or morepreviously encoded and decoded CUs, i.e., reconstructed CUs.

The mode selection component 700 determines the CU partitioning, PUpartitioning, TU partitioning, and prediction modes of an LCU. Theoperation of the mode selection component 700 is explained in referenceto FIG. 8 .

The predicted PUs from the mode selection component 700 are provided toa negative input of the combiner 702 and to a positive input of anothercombiner 714, e.g., an adder. The associated transform block sizes arealso provided to the transform component 704. The combiner 702 subtractseach predicted PU from the original PU to provide residual PUs to thetransform component 704. Each resulting residual PU is a set of pixeldifference values that quantify differences between pixel values of theoriginal PU and the predicted PU. The residual blocks of all the PUs ofa CU form a residual CU block for the transform component 704.

The transform component 704 performs block transforms on the residual CUto convert the residual pixel values to transform coefficients andprovides the transform coefficients to the quantize component 706. Morespecifically, the transform component 704 receives the transform blocksizes for the residual CU from the mode selection component 700 andapplies transforms of the specified sizes to the residual CU to generatetransform coefficients.

The quantize component 706 quantizes the transform coefficients based onquantization parameters (QPs) and quantization matrices provided by thecoding control component and the transform sizes. Although notspecifically shown, the quantized transform coefficients are taken outof their scan ordering and arranged sequentially for entropy coding. Inessence, the coefficients are scanned backward in highest to lowestfrequency order until a coefficient with a non-zero value is located.Once the first coefficient with a non-zero value is located, thatcoefficient and all remaining coefficient values following thecoefficient in the highest to lowest frequency scan order are serializedand passed to the entropy encoder 708.

The entropy encoder 708 entropy encodes the relevant data, i.e., syntaxelements, output by the various encoding components and the codingcontrol component to generate the compressed video bit stream. Thesyntax elements are encoded according to the syntactical order specifiedin HEVC. This syntactical order specifies the order in which syntaxelements should occur in a compressed video bit stream. Among the syntaxelements that are encoded are the split flags indicating the CUpartitioning of an LCU, the prediction modes for the CUs, and thetransform coefficients for the CUs.

To determine the reconstructed input, i.e., reference data, needed bythe mode selection component 700, the quantized transform coefficientsfor a CU are provided to a dequantize component 710, which outputs areconstructed version of the transform result from the transformcomponent 704.

The dequantized transform coefficients are provided to the inversetransform component 712, which outputs estimated residual informationrepresenting a reconstructed version of a residual CU. The inversetransform component 712 receives the transform block size used togenerate the transform coefficients and applies inverse transform(s) ofthe specified size to the transform coefficients to reconstruct theresidual values.

The reconstructed residual CU is provided to the combiner 714. Thecombiner 714 adds the predicted PUs of the CU from the mode selectioncomponent 700 to the reconstructed residual PUs of the CU to generate areconstructed CU. The reconstructed CU is stored in reference storage716 for use by the mode selection component 700.

FIG. 8 is a block diagram of the mode selection component 700. Aspreviously described, the mode selection component 700 determines CUpartitioning, PU partitioning, TU partitioning, and prediction modes foran LCU. For simplicity of explanation in the description below, a 64×64LCU and a hierarchy depth of 4 is assumed. One of ordinary skill in theart will understand embodiments in which the LCU size and/or hierarchydepth differ from these assumptions. The TU partitioning is performed asspecified by HEVC, e.g., HEVC Draft 7, and is not specifically describedherein.

The mode selection component 700 includes an intra-prediction component800, a storage component 802, an inter-prediction component 804, a modedecision component 806, and a CU selection component 808. Although notspecifically shown, inherent in the mode selection component 700 isfunctionality to perform the transformation, quantization,dequantization, inverse transformation, and reconstruction needed todetermine coding costs for intra-prediction and motion estimation.

The intra-prediction component 800 performs bottom-up processing on theLCU beginning with the smallest CU size to determine an intra-predictioncoding cost, a best PU partition type, and an intra-prediction mode foreach PU of the best PU partition type for each possible CU in the LCUhierarchy. The operation of the intra-prediction component 800 todetermine an intra-prediction coding cost, a best PU partition type, andan intra-prediction mode for each PU of the best PU partition type for aCU is the same as that of the intra-prediction component 302 of FIG. 3with the exception that previously encoded neighboring CUs used fortesting of intra-prediction modes are all intra-predicted. In addition,rather than providing the intra-prediction coding cost, the selected PUpartition type, and the intra-prediction modes selected for the PUs inthe selected PU partition type for each CU directly to a mode decisioncomponent, this information is stored in the storage 802. Thus, afterthe LCU is processed by the intra-prediction component 800, anintra-prediction coding cost, a best PU partition type, and anintra-prediction mode for each PU of the best PU partition type for eachpossible CU in the LCU is stored in the storage 802.

The operation of the intra-prediction component 800 is now explained inmore detail in reference to the example of FIGS. 4A-4C. Beginning withthe smallest CU size, i.e., 8×8, an intra-prediction coding cost, a bestPU partition type, and an intra-prediction mode for each PU of the bestPU partition type are determined in turn for A11, A12, A13, and A14.Intra-prediction mode information for these CUs, e.g., theintra-prediction coding cost, the best PU partition type, and anintra-prediction mode for each PU of the best PU partition type isstored in the storage 802.

The parent CU A1 is then processed to determine an intra-predictioncoding cost, a best PU partition type, and intra-prediction modes forthe PUs of the best PU partition type for CU A1 and to store theintra-prediction mode information for CU A1 in the storage 802. Theparent CUs A2, A3, and A4 and their respective child CUs are similarlyprocessed to determine intra-prediction coding costs, best PU partitiontypes, and intra-prediction modes for the PUs of the best PU partitiontypes for the respective regions of the LCU, and to store theintra-prediction mode information for the CUs in the storage 802. Theparent of CUs A1, A2, A3, and A4, CU A, is then processed to determinean intra-prediction coding cost, a best PU partition type, andintra-prediction modes for the PUs of the best PU partition type for CUA, and to store the intra-prediction mode information for CU A in thestorage 802. Note that because there is a single PU partition type forCUs A1, A2, A3, A4, and A, i.e., the 2N×2N PU partition type, this PUpartition type is the best PU partition type for these CUs by default.

Note that at this point, the intra-prediction mode information for CUsA11-A44, A1-A4, and A are stored in the storage 802. CUs B, C, and D aresimilarly processed in turn as described above to determine anintra-prediction coding cost, a best PU partition type, andintra-prediction modes for the PUs of the best PU partition type foreach CU size starting with the smallest CUs, and to store theintra-prediction mode information for each of the CUs in the storage802. As a final step, an intra-prediction coding cost, a best PUpartition type, and an intra-prediction mode for the PUs of the best PUpartition type is determined for the LCU as a whole, and theintra-prediction mode information for the LCU is stored in the storage802. Thus, the intra-prediction mode information for each of the CUs ofFIGS. 4A, 4B, and 4C as well as the intra-prediction mode informationfor the LCU as a whole are stored in the storage 802. Note that becausethere is a single PU partition type, i.e., the 2N×2N PU partition type,for CUs B, C, D, and their respective child CUs (except the smallestchild CUs) and for the LCU, this PU partition type is the best PUpartition type for those CUs and the LCU by default.

The inter-prediction component 804 performs inter-prediction on allpossible CUs in an LCU. More specifically, the inter-predictioncomponent 804 performs bottom-up processing on the LCU beginning withthe smallest CU size to determine an inter-prediction coding cost, abest PU partition type, and an inter-prediction mode for each PU of thebest PU partition type for all possible CUs in the LCU. The operation ofthe inter-prediction component 804 to determine an inter-predictioncoding cost, a best PU partition type, and an inter-prediction mode foreach PU of the best PU partition type is the same as that of theinter-prediction component 300 of FIG. 3 . The inter-prediction codingcost, the best PU partition type, and the inter-prediction modesselected for the PUs of the best PU partition type are provided to themode decision component 806.

The mode decision component 806 compares the intra-prediction codingcost and the inter-prediction coding cost for a CU and chooses thelowest cost prediction mode as the best prediction mode for the CU. Forthe comparison, the mode decision component 806 receives theinter-prediction coding cost for a CU from the inter-predictioncomponent 804 and receives the intra-prediction coding cost for the CUfrom the storage 802. The best mode information for the selectedprediction mode is then provided to the inter-prediction component 804for use in processing of subsequent CUs. If intra-prediction mode isselected as the best prediction mode for the CU, the relevantintra-prediction information for the CU is retrieved from the storage802. The best mode information is also provided to the CU selectioncomponent 808.

For each four child CUs and the parent CU, the CU selection component808 selects the best CU partition based on the summed coding costs ofthe four child CUs and the coding cost of the parent CU, i.e., thepartition with the lowest coding cost is selected. The best modeinformation for the selected CU partition is provided to theinter-prediction component 804 for use in processing of subsequent CUs.

The operation of the inter-prediction component 804, the mode decisioncomponent 806, and the CU selection component 808 is now explained inmore detail in reference to the example of FIGS. 4A-4C. Beginning withthe smallest CU size, i.e., 8×8, the inter-prediction component 804determines an inter-prediction coding cost for CU A11. The mode decisioncomponent 806 then selects the best prediction mode for CU A11 based onthe inter-prediction coding cost selected by the inter-predictioncomponent 804 and the intra-prediction coding cost for CU A11 previouslydetermined by the intra-prediction component 800 and stored in thestorage 802. The best mode information is provided to theinter-prediction component 804 for use in processing of subsequent CUs.The best mode information is also provided to the CU selection component808.

CUs A12, A13, and A14 are similarly processed to select the bestprediction mode for each CU. The parent CU A1 is then processed in asimilar fashion to select the best prediction mode. The CU selectioncomponent 808 then selects the CU partition by comparing the sum ofcoding costs of the child CUs, A11, A12, A13, and A14, to the codingcost of the parent CU, A1. The best mode information for the selected CUpartition is provided to the inter-prediction component 804 for use inprocessing subsequent CUs.

The parent CUs A2, A3, and A4 and their respective child CUs aresimilarly processed to select the best CU partition and predictionmode(s) for the respective regions of the LCU. The parent of CUs A1, A2,A3, and A4, CU A, is then processed in a similar fashion to select thebest prediction mode for CU A. The CU selection component 808 thenselects the CU partition by comparing the sum of coding costs of thechild CUs, A1, A2, A3, and A4, to the coding cost of the parent CU, CUA.

Note that at this point, the CU hierarchy for CU A may be the entire CU,the four 16×16 CUs, A1, A2, A3, and A4, the 16 8×8 CUs, A11-A44, or acombination of 16×16 and 8×8 CUs. For example, as shown in FIG. 5 , theCU hierarchy for CU A may be as shown when the coding costs of CUs A1,A3, and A4 are better than the summed costs of their child CUs and thesummed costs of the child CUs of CU A2 are better than the cost of theirparent CU.

Referring again to FIGS. 4A-4C, CUs B, C, and D are processed in turn asdescribed above to choose the best prediction modes and partitionbeginning with the smallest CU size. As with CU A, the CU hierarchy foreach of CUs B, C, and D may be the entire CU, the four 16×16 CUs, the 168×8 CUs, or a combination of 16×16 and 8×8 CUs. For example, as shown inFIG. 5 , the CU hierarchy for CU B may be as shown when the coding costof CU B is better than the summed coding cost of CUs B1, B2, B3, and B4.Further, the CU hierarchy for CU C may be as shown when the coding costof each of the CUs C1, C2, C3, and C4 is better than the summed codingcosts of their respective child CUs and the summed coding costs of thesefour CUs are better than the coding cost of CU B. In addition, the CUhierarchy for CU D may be as shown when the coding costs of CUs D2, D3,and D4 are better than the summed costs of their child CUs and thesummed costs of the child CUs of CU D1 are better than the cost of theirparent CU.

As a final step, the best prediction mode of the LCU is determined andthe coding cost of this prediction mode is compared to the summed codingcosts of CUs A, B, C, and D. If the coding cost of the LCU is better,then the LCU is selected for coding; otherwise, the best modes/CUstructures of CUs A, B, C, and D are selected for coding. Morespecifically, if the LCU level coding cost is best, the output of themode selection component 700 is the PU structure and TU structure of theLCU best mode, the predicted PUs, and the prediction data for the PUs,e.g., prediction mode, prediction angle, motion vector(s), motion vectorpredictors, prediction direction, reference picture index (indices),etc. And, if the LCU level coding cost is not best, the output of themode selection component 700 is the CU structure of CUs A, B, C, and D,the PU and TU structures of the best mode for each CU in the CUstructure, the predicted PUs of each CU, and the prediction data for thePUs. For example, if the CU structure of CUs A, B, C, and D is that ofFIG. 5 , then PU and TU structures and predicted PUs generated whendetermining the best prediction mode for CUs A1, A21, A22, A23, A24, A3,A4, B, C1, C2, C3, C4, D11, D12, D13, D14, D2, D3, and D4 are output bythe mode selection component 700.

Note that in determining the summed coding costs of CUs A, B, C, and D,the coding costs of the CUs in the hierarchy of each of these CUs isused. For example, in the example of FIG. 5 , the coding cost of CU A isthe summed coding costs of CUs A1, A21, A22, A23, A24, A3, and A4 andthe coding cost of CU C is the summed coding costs of CUs C1, C2, C3,and C4.

In some embodiments, a fast motion estimation technique may be used bythe inter-prediction component 804 to determine the best motion vectorsfor PUs in each CU. An overview of this technique is explained inreference to the example of FIG. 9 . For simplicity of explanation, thePU partitioning of all CUs is assumed to be 2N×2N, i.e., PU=CU and onlyone prediction direction, i.e., forward prediction, is assumed. LetCU(n) denote a CU at level m in the CU hierarchy. The range of m is 0 toM−1, where M is the number of CU levels, and 0 and M−1 are the largestand smallest CU levels, respectively. To determine a motion vector for aparent CU(k) (k=0˜M−2), the best four motion vectors of correspondingchild CU(k+1)s are examined to select one of the motion vectors as apredictor for the parent CU(k). The selection may be made, for example,by computing the sum of absolute differences (SAD) between the CU(k) andthe reference blocks indicated by each of the four motion vectors andselecting the motion vector with the best result. The selected predictoris then refined using a simple motion search, e.g., the previouslymentioned one step search, to determine the motion vector for the parentCU(k).

For the smallest CU level, CU (k=M−1), a more complex motion search,e.g., a full search, is used to determine the motion vector. Thecomplexity of the motion search used for the smallest CUs and thecomplexity of the motion search used to refine the predictor in theparent CUs may depend on the computational capability of the underlyinghardware. For example, for systems with lower computational capability,the motion search at the smallest CU level may be a three step searchand the motion search for refinement of the predictors at the higher CUlevels may be the previously mentioned one step search. For systems withhigher computational capability, the motion search at the smallest CUlevel may be a full motion search and the motion search for refinementof the predictors at the higher CU levels may be a three step search.

The use of the fast motion estimation technique in an embodiment of theintra-prediction component 804 is now described. As was previouslydescribed, the inter-prediction component 804 processes a CU for each ofthe PU partition types specified for the particular CU size to determinethe best PU partition type and inter-prediction coding cost for the CU.To determine the best PU partition type, the inter-prediction component804 determines an inter-prediction coding cost for each specified PUpartition type. As part of determining the inter-prediction coding costfor a PU partition type, the inter-prediction component 804 determines acoding cost for each PU of the PU partition type for normalinter-prediction mode. To determine the coding cost of a PU for normalinter-prediction mode, the inter-prediction component 804 performs aforward motion search and a backward motion search to determine the bestforward motion vector and backward motion vector for the PU, i.e., tofind a best matching block of the same size and shape as the PU in aforward reference picture and in a backward reference picture. In anembodiment, the motion search technique used for the forward motionsearch and the backward motion search depends on whether the CU beingprocessed is a CU of the smallest size, e.g., 8×8, or is a parent CU,i.e., a CU of one of the larger sizes, e.g., 16×16, 32×32, or 64×64.

If the CU being processed by the inter-prediction component 804 is ofthe smallest size, the inter-prediction component 804 uses a suitablemotion search, e.g., a full motion search or a three step search, forthe forward motion search and the backward motion search to determinethe best forward motion vector and backward motion vector. Thus, foreach specified PU partition type for a smallest CU, i.e., 2N×2N, 2N×N,N×2N, and N×N, a best forward motion vector and a best backward motionvector is determined for each PU of each PU partition type. For example,because there is only one PU in the 2N×2N PU partition type, a singlebest forward motion vector and a single best backward motion vector isdetermined. For the 2N×N and N×2N PU partition types, a best forwardmotion vector and a best backward motion vector is determined for PU0and for PU1 (see FIG. 10 ). For the N×N PU partition type, a bestforward motion vector and a best backward motion vector is determinedfor PU0, for PU1, for PU2, and for PU 3 (see FIG. 10 ).

Further, after the inter-prediction component 804 selects the best PUpartition type for the CU, the inter-prediction component 804 selectsthe forward motion vector and the backward motion vector determined forPU0 (see FIG. 10 ) of this best PU partition type as candidate forwardand backward predictors for the parent CU of the CU. Note that even ifinter-prediction component 804 selects merge mode as the bestinter-prediction mode for PU0 of the best PU partition type, the forwardmotion vector and the backward motion vector determined for PU0 can beused as these motion vectors were determined as part of determining thecoding cost of PU0 for normal inter-prediction mode.

If the CU being processed by the inter-prediction component 804 is aparent CU, the inter-prediction component 804 uses a simplified motionsearch for the forward motion search and the backward motion search.First, the inter-prediction component 804 evaluates the four candidateforward predictors from the child CUs of the parent CU to select one asa forward predictor for the PU. The forward predictor may be determinedby computing a SAD result for each candidate forward predictor andpicking the candidate forward predictor with the best, i.e., lowest, SADresult. Other suitable evaluation techniques may also be used. Theinter-prediction component 804 also similarly evaluates the fourcandidate backward predictors from the child CUs to select one as abackward predictor for the PU. The inter-prediction component 804 thenrefines the forward predictor and the backward predictor using asuitable simple motion search, e.g., a three step search or thepreviously mentioned one step search, to determine the forward motionvector and the backward motion vector for the PU.

Thus, for each specified PU partition type for a parent CU, i.e., 2N×2N,2N×N, N×2N, 2N×nU, 2N×nD, nL×2N, and nR×2N, a best forward motion vectorand a best backward motion vector is determined for each PU of each PUpartition type. For example, because there is only one PU in the 2N×2NPU partition type, a single best forward motion vector and a single bestbackward motion vector is determined. For the other PU partition types,a best forward motion vector and a best backward motion vector isdetermined for PU0 and for PU1 (see FIG. 10 ).

Further, after the inter-prediction component 804 selects the best PUpartition type for the parent CU, the inter-prediction component 804selects the forward motion vector and the backward motion vectordetermined for PU0 (see FIG. 10 ) of this best PU partition type ascandidate forward and backward predictors for the parent CU (if any) ofthe CU. Note that even if inter-prediction component 804 selects mergemode as the best inter-prediction mode for PU0 of the best PU partitiontype, the forward motion vector and the backward motion vectordetermined for PU0 can be used as these motion vectors were determinedas part of determining the coding cost of PU0 for normalinter-prediction mode.

Three step searches and full motion searches are well known in the art.Examples of such searches are described in D. Turaga and M. Alkanhal,“Search Algorithms for Block-Matching in Motion Estimation,” pp. 1-12,Spring, 1998, Carnegie Mellon University, Pittsburgh, Pa., available athttp://www.ece.cmu.edu/˜ee899/project/deepak_mid.htm and in “RandomNoise: Search Methods in Motion Estimation,” pp. 1-5, Sep. 14, 2010,available athttp://blog.weisu.org/2008/12/search-methods-in-motion-estimation.html.Examples of other suitable motion search techniques that may be used inembodiments are also described in these documents.

FIG. 11 is a flow diagram of a method for CU partitioning of an LCU thatmay be performed in an encoder. Initially, intra-prediction is performed1100 on the LCU for all permitted CU sizes. The permitted CU sizes maybe derived from a predetermined LCU size and a predetermined maximum CUhierarchy depth. The intra-prediction is performed bottom up beginningwith the smallest permitted CU size and an intra-prediction coding cost,a best PU partition type, and an intra-prediction mode for each PU ofthe best PU partition type is determined for each CU. Theintra-prediction coding cost, a best PU partition type, and theintra-prediction modes for the PUs of the best PU partition type for allof the CUs are stored in memory for use in selecting the actual codingstructure for the LCU. Bottom up intra-prediction of all permitted CUsizes is previously described in more detail herein.

Bottom up inter-prediction, mode selection, and CU partition selectionis then performed 1102-1110 on the LCU to determine the CU partitioningfor encoding. Beginning with the smallest permitted CU size,inter-prediction is performed 1102 on a CU to determine aninter-prediction coding cost for the CU. The best prediction mode forthe CU is then selected 1104 based on the inter-prediction coding costand the intra-prediction coding cost determined for the CU duringintra-prediction. The intra-prediction coding cost for the CU is readfrom the memory where the data was stored during intra-predictionprocessing of the LCU.

If the current CU is not a parent CU 1106, processing continues with thenext child CU. If the current CU is a parent CU 1106, then a CUpartition is selected for the parent CU. This selection is made bycomparing the summed coding costs of the child CUs to the coding cost ofthe parent CU, and selecting the CU partition with the smallest codingcost. Processing continues with the next CU unless the parent CU is theLCU 1110. The bottom up inter-prediction, mode selection, and CUpartition selection is previously described in more detail herein.

FIG. 12 is a flow diagram of a method for fast motion estimation inbottom up CU partitioning. This method may be performed for each CU todetermine the best motion vectors for PUs. If the CU is a CU of thesmallest size 1200 in the CU hierarchy, then the best forward andbackward motion vectors for each of the PUs of each of the PU partitiontypes specified for the smallest CU size (see FIG. 10 ) are determined1202 using a suitable motion search, e.g., a full motion search or athree step search. A candidate forward predictor and a candidatebackward predictor for the parent CU is also selected 1204. Selection ofcandidate forward and backward predictors when a CU is of the smallestsize is previously described herein.

If the CU is not a CU of the smallest size 1200, i.e., the CU is aparent CU, one of the specified PU partition types for the parent CUsize (see FIG. 10 ) is selected 1206 for motion vector determination.Any of the specified PU partition types may be selected as the initialPU partition type. Predictors, i.e., a forward predictor and a backwardpredictor, are then selected 1208 for a PU of the current PU partitiontype from the four candidate forward predictors and the four candidatebackward predictors of the child CUs. That is, the four candidateforward predictors and the four candidate backward predictors areevaluated to select the best forward predictor and backward predictorfor the PU. The forward predictor may be determined by computing a SADresult for each candidate forward predictor and picking the candidateforward predictor with the best, i.e., lowest, SAD result. Othersuitable evaluation techniques may also be used. The four candidatebackward predictors from the child CUs are also similarly evaluated toselect one as a backward predictor for the PU.

The selected predictors are then refined 1210 to determine a forwardmotion vector and backward motion vector for the PU. The refinement isperformed using a suitable motion search technique, e.g., a motionsearch technique of less complexity than the one used for determiningthe motion vectors of the smallest CUs. Examples of such motion searchtechniques include a three step search and the previously mentioned onestep search.

The selection of predictors and the refining of the selected predictorsis repeated for each PU in the current PU partition type 1212. Onceforward and backward motion vectors are determined for all PUs of thecurrent PU partition type 1212, the steps 1208-1210 are repeated for thenext PU partition type, if any 1214. Once forward and backward motionvectors have been determined for all PUs of all PU partition types,candidate predictors are selected for the parent CU, if the CU has aparent. Selection of candidate forward and backward predictors when a CUis a parent CU is previously described herein.

FIG. 13 is a block diagram of an example digital system suitable for useas an embedded system that may be configured to perform CU partitioningand fast motion estimation as described herein during encoding of avideo stream. This example system-on-a-chip (SoC) is representative ofone of a family of DaVinci™ Digital Media Processors, available fromTexas Instruments, Inc. This SoC is described in more detail in“TMS320DM6467 Digital Media System-on-Chip”, SPRS403G, December 2007 orlater, which is incorporated by reference herein.

The SoC 1300 is a programmable platform designed to meet the processingneeds of applications such as video encode/decode/transcode/transrate,video surveillance, video conferencing, set-top box, medical imaging,media server, gaming, digital signage, etc. The SoC 1300 providessupport for multiple operating systems, multiple user interfaces, andhigh processing performance through the flexibility of a fullyintegrated mixed processor solution. The device combines multipleprocessing cores with shared memory for programmable video and audioprocessing with a highly-integrated peripheral set on common integratedsubstrate.

The dual-core architecture of the SoC 1300 provides benefits of both DSPand Reduced Instruction Set Computer (RISC) technologies, incorporatinga DSP core and an ARM926EJ-S core. The ARM926EJ-S is a 32-bit RISCprocessor core that performs 32-bit or 16-bit instructions and processes32-bit, 16-bit, or 8-bit data. The DSP core is a TMS320C64x+TM core witha very-long-instruction-word (VLIW) architecture. In general, the ARM isresponsible for configuration and control of the SoC 1300, including theDSP Subsystem, the video data conversion engine (VDCE), and a majorityof the peripherals and external memories. The switched central resource(SCR) is an interconnect system that provides low-latency connectivitybetween master peripherals and slave peripherals. The SCR is thedecoding, routing, and arbitration logic that enables the connectionbetween multiple masters and slaves that are connected to it.

The SoC 1300 also includes application-specific hardware logic, on-chipmemory, and additional on-chip peripherals. The peripheral set includes:a configurable video port (Video Port I/F), an Ethernet MAC (EMAC) witha Management Data Input/Output (MDIO) module, a 4-bit transfer/4-bitreceive VLYNQ interface, an inter-integrated circuit (I2C) businterface, multichannel audio serial ports (McASP), general-purposetimers, a watchdog timer, a configurable host port interface (HPI);general-purpose input/output (GPIO) with programmable interrupt/eventgeneration modes, multiplexed with other peripherals, UART interfaceswith modem interface signals, pulse width modulators (PWM), an ATAinterface, a peripheral component interface (PCI), and external memoryinterfaces (EMIFA, DDR2). The video port I/F is a receiver andtransmitter of video data with two input channels and two outputchannels that may be configured for standard definition television(SDTV) video data, high definition television (HDTV) video data, and rawvideo data capture.

As shown in FIG. 13 , the SoC 1300 includes two high-definitionvideo/imaging coprocessors (HDVICP) and a video data conversion engine(VDCE) to offload many video and image processing tasks from the DSPcore. The VDCE supports video frame resizing, anti-aliasing, chrominancesignal format conversion, edge padding, color blending, etc. The HDVICPcoprocessors are designed to perform computational operations requiredfor video encoding such as motion estimation, motion compensation,intra-prediction, transformation, and quantization. Further, thedistinct circuitry in the HDVICP coprocessors that may be used forspecific computation operations is designed to operate in a pipelinefashion under the control of the ARM subsystem and/or the DSP subsystem.

As was previously mentioned, the SoC 1300 may be configured to performCU partitioning and fast motion estimation during video encoding usingmethods described herein. For example, the coding control of the videoencoder of FIG. 7 may be executed on the DSP subsystem or the ARMsubsystem and at least some of the computational operations of the blockprocessing, including the intra-prediction and inter-prediction of modeselection, transformation, quantization, and entropy encoding may beexecuted on the HDVICP coprocessors. Entropy encoding on the HDVICPcoprocessors may signal the selected CU partitioning into the encodedbit stream.

OTHER EMBODIMENTS

While the invention has been described with respect to a limited numberof embodiments, those skilled in the art, having benefit of thisdisclosure, will appreciate that other embodiments can be devised whichdo not depart from the scope of the invention as disclosed herein.

For example, one of ordinary skill in the art will appreciateembodiments in which an embodiment of the fast motion estimationtechnique described herein is used in the bottom up CU partitioning ofFIG. 3 .

In another example, embodiments have been described herein assuming thatthe PU partition types are those of FIG. 10 . One of ordinary skill ofthe art will understand embodiments of the invention that use fewer PUpartition types, more partition types, and differing partition types.The specified PU partition types for a CU size and/or for inter andintra-prediction may also differ from what is shown in FIG. 10 . Forexample, in some embodiments, the N×N PU partition type may be used forone or more CU sizes other than the smallest CU size forinter-prediction and/or intra-prediction. In another example, in someembodiments, the 2N×N and N×2N partition types may be used for one ormore CU sizes for intra-prediction.

In another example, embodiments have been described in which bothforward and backward motion vectors are determined for a PU. One ofordinary skill in the art will understand embodiments in which a singlemotion vector is determined for a PU.

In another example, embodiments of a fast motion estimation techniquehave been described herein in which the motion search used to refine apredictor is less complex than the motion search used to determinemotion vectors for a CU of the smallest size. One of ordinary skill inthe art will understand embodiments in which the same motion search isused for refining a predictor and determining the motion vectors for asmallest CU. For example, a three step search may be used for both.

In another example, embodiments have been described assuming the HEVCinter-prediction and Intra-prediction modes. One of ordinary skill inthe art will appreciate embodiments in which the inter-prediction andintra-prediction modes are different from those defined in HEVC, e.g.,HEVC Draft 7.

In another example, embodiments have been described assuming quadtreepartitioning of the coding unit hierarchy. One of ordinary skill in theart will appreciate embodiments in which a different partitioning of thecoding unit hierarchy is used.

Embodiments of the methods and encoders described herein may beimplemented in hardware, software, firmware, or any combination thereof.If completely or partially implemented in software, the software may beexecuted in one or more processors, such as a microprocessor,application specific integrated circuit (ASIC), field programmable gatearray (FPGA), or digital signal processor (DSP). The softwareinstructions may be initially stored in a computer-readable medium andloaded and executed in the processor. In some cases, the softwareinstructions may also be sold in a computer program product, whichincludes the computer-readable medium and packaging materials for thecomputer-readable medium. In some cases, the software instructions maybe distributed via removable computer readable media, via a transmissionpath from computer readable media on another digital system, etc.Examples of computer-readable media include non-writable storage mediasuch as read-only memory devices, writable storage media such as disks,flash memory, memory, or a combination thereof.

It is therefore contemplated that the appended claims will cover anysuch modifications of the embodiments as fall within the true scope ofthe invention.

What is claimed is:
 1. A method comprising: performing intra-predictionon a plurality of coding units (CUs) of a largest coding unit (LCU) todetermine an intra-prediction coding cost and a prediction unit (PU)partition type for each of the plurality of CUs, wherein the pluralityof CUs includes a smallest CU and the performing intra-prediction beginswith the smallest CU; storing the intra-prediction coding cost and thePU partition type for the plurality of CUs; performing inter-predictionon the plurality of CUs to determine an inter-prediction coding cost foreach of the CUs in the plurality of CUs; and performing CU partitionselection on the plurality of CUs based on the stored intra-predictioncoding cost and PU partition type for each of the plurality of CUs andthe inter-prediction coding cost for each of the plurality of CUs todetermine a CU partition.
 2. A system comprising: a memory; one or moreprocessors configured to: perform intra-prediction on each of aplurality of coding units (CUs) of a largest coding unit (LCU) todetermine an intra-prediction coding cost and prediction unit (PU)partition type for each of the CUs in the plurality of CUs, wherein theplurality of CUs includes a smallest CU and the one or more processorsperform intra-prediction beginning with the smallest CU; store theintra-prediction coding cost and PU partition type for each of theplurality of CUs; perform inter-prediction on each of the plurality ofCUs to determine an inter-prediction coding cost for each of theplurality of CUs; perform prediction mode selection on each of theplurality of CUs based on the stored intra-prediction coding cost foreach of the plurality of CUs and the inter-prediction coding cost and PUpartition type for each of the plurality of CUs to select bestprediction modes for the plurality of CUs, each of the best predictionmodes corresponding to a respective one of the plurality of CUs; andperform CU partition selection on each of the plurality of CUs based oncoding costs for the best prediction modes for the CUs to determine a CUpartition.
 3. The system of claim 2, wherein the one or more processorsare further configured to: compare the inter-prediction coding cost tothe intra-prediction coding cost to select a best prediction mode forthe respective one of the plurality of CUs.
 4. A non-transitory computerreadable medium comprising instructions that, when executed in a digitalsystem, cause the digital system to: perform coding unit (CU) partitionselection on each of a plurality of CUs of a largest coding unit (LCU)based on intra-prediction coding costs and prediction unit (PU)partition types for each of the plurality of CUs and inter-predictioncoding costs and PU partition types for each of the plurality of CUs todetermine a CU partitioning, wherein the plurality of CUs includes asmallest CU and the instructions cause the digital system to determinethe intra-prediction coding costs for each of the plurality of CUsbeginning with the smallest CU; and select a coding unit structure usingthe intra-prediction coding costs and the PU partition types.
 5. Themethod of claim 1, wherein performing the CU partition selectionincludes: performing prediction mode selection on each of the pluralityof CUs based on the stored intra-prediction coding cost for each of theplurality of CUs and the inter-prediction coding cost for each of theplurality of CUs to select best prediction modes for the CUs, each ofthe best prediction modes corresponding to a respective one of theplurality of CUs.
 6. The method of claim 1, wherein determining anintra-prediction coding cost and a PU partition type for each of theplurality of CUs further comprises determining an intra-prediction modefor each PU of the PU partition type.
 7. The method of claim 1, furthercomprising: selecting a coding unit structure using the intra-predictioncoding cost and a best PU partition type which includes selecting acoding unit structure for a largest coding unit using anintra-prediction mode for each PU of the best PU partition type.
 8. Themethod of claim 5, wherein performing the prediction mode selectionincludes: comparing the inter-prediction coding cost to theintra-prediction coding cost to select the best prediction mode for therespective one of the plurality of CUs.
 9. The non-transitory computerreadable medium of claim 4, wherein the instructions further cause thedigital system to perform mode selection by comparing aninter-prediction coding cost for a respective one of the CUs to anintra-prediction coding cost for the respective one of the plurality ofCUs to select a best prediction mode for the CU.